import { lazy } from "react";
const Login =lazy(()=>import('./../views/Login'))
const Index=lazy(()=>import('./../views/Index'))
const Indexss=lazy(()=>import('./../views/systemSettings/index'))
const AdmList=lazy(()=>import('./../views/administrator/admList'))
const AdmAdd=lazy(()=>import('./../views/administrator/admAdd'))
const Admdetail=lazy(()=>import('./../views/administrator/Admdetail'))
const DepList=lazy(()=>import('./../views/department/depList'))
const DepAdd=lazy(()=>import('./../views/department/depAdd'))
const Depupdate=lazy(()=>import('./../views/department/depupda'))
const VisList=lazy(()=>import('./../views/visitor/visList'))
const VisAdd=lazy(()=>import('./../views/visitor/visAdd'))
const RevList=lazy(()=>import('./../views/reviewer/revList'))
const RevAdd=lazy(()=>import('./../views/reviewer/revAdd'))
const RevLog=lazy(()=>import('./../views/reviewer/revLog'))
const AduList=lazy(()=>import('./../views/auditlog/AduList'))
const AduAdd=lazy(()=>import('./../views/auditlog/AduAdd'))
const NewsList=lazy(()=>import('./../views/news/newsList'))
const NewsAdd=lazy(()=>import('./../views/news/newsAdd'))
const System=lazy(()=>import('./../views/systemSettings/system'))
interface IRouter{
    path:string,
    element:JSX.Element,
    children ?:Array<IRouter>
}

const routers:Array<IRouter>=[
    {path:'/',element:<Login></Login>},
    {path:'/index/',element:<Index></Index>,children:[
        {path:'/index/',element:<Indexss></Indexss>},
        {path:'/index/administrator',element:<AdmList></AdmList>},
        {path:'/index/administratorAdd/:id/:title',element:<AdmAdd></AdmAdd>},
        {path:'/index/admindetail/:id',element:<Admdetail></Admdetail>},
        {path:'/index/department',element:<DepList></DepList>},
        {path:'/index/departmentAdd',element:<DepAdd></DepAdd>},
        {path:'/index/departmentUpdate',element:<Depupdate></Depupdate>},
        {path:'/index/visitor',element:<VisList></VisList>},
        {path:'/index/visitorAdd',element:<VisAdd></VisAdd>},
        {path:'/index/reviewer',element:<RevList></RevList>},
        {path:'/index/reviewerAdd/:id/:titles',element:<RevAdd></RevAdd>},
        {path:'/index/reviewerLog',element:<RevLog></RevLog>},
        {path:'/index/auditlog',element:<AduList></AduList>},
        {path:'/index/auditlogAdd',element:<AduAdd></AduAdd>},
        {path:'/index/news',element:<NewsList></NewsList>},
        {path:'/index/newsAdd',element:<NewsAdd></NewsAdd>},
        {path:'/index/system',element:<System></System>},
    ]}
]

export {routers}